import Util;
import RPC;
import EndpointUtil;

extends RPC;

init(config: RPC.Config){
  super(config);
  @endpointRule = 'central';
  
  checkConfig(config);
  @endpoint = getEndpoint('pts', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

model DescribeConfigRequest = {
  routeRequestBody?: map[string]any(name='RouteRequestBody'),
}

model DescribeConfigResponse = {
  requestId: string(name='RequestId'),
  message: string(name='Message'),
  code: string(name='Code'),
  routeResponseBody: string(name='RouteResponseBody'),
  success: string(name='Success'),
}

async function describeConfigWithOptions(request: DescribeConfigRequest, runtime: Util.RuntimeOptions): DescribeConfigResponse {
  Util.validateModel(request);
  return doRequest('DescribeConfig', 'HTTPS', 'POST', '2019-08-10', 'AK', null, request, runtime);
}

async function describeConfig(request: DescribeConfigRequest): DescribeConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeConfigWithOptions(request, runtime);
}

model SubmitTestingRequest = {
  sceneId?: string(name='SceneId'),
}

model SubmitTestingResponse = {
  requestId: string(name='RequestId'),
  success: boolean(name='Success'),
  code: string(name='Code'),
  message: string(name='Message'),
  httpStatusCode: integer(name='HttpStatusCode'),
  submitResult: string(name='SubmitResult'),
}

async function submitTestingWithOptions(request: SubmitTestingRequest, runtime: Util.RuntimeOptions): SubmitTestingResponse {
  Util.validateModel(request);
  return doRequest('SubmitTesting', 'HTTPS', 'POST', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', null, request, runtime);
}

async function submitTesting(request: SubmitTestingRequest): SubmitTestingResponse {
  var runtime = new Util.RuntimeOptions{};
  return submitTestingWithOptions(request, runtime);
}

model SubmitProgressRequest = {
  sceneId?: string(name='SceneId'),
  taskId?: string(name='TaskId'),
}

model SubmitProgressResponse = {
  requestId: string(name='RequestId'),
  success: boolean(name='Success'),
  code: string(name='Code'),
  message: string(name='Message'),
  httpStatusCode: integer(name='HttpStatusCode'),
  submitResult: string(name='SubmitResult'),
}

async function submitProgressWithOptions(request: SubmitProgressRequest, runtime: Util.RuntimeOptions): SubmitProgressResponse {
  Util.validateModel(request);
  return doRequest('SubmitProgress', 'HTTPS', 'POST', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', null, request, runtime);
}

async function submitProgress(request: SubmitProgressRequest): SubmitProgressResponse {
  var runtime = new Util.RuntimeOptions{};
  return submitProgressWithOptions(request, runtime);
}

model ListSlaWarningsRequest = {
  planId: string(name='PlanId'),
  pageNumber: integer(name='PageNumber'),
  pageSize: integer(name='PageSize'),
}

model ListSlaWarningsResponse = {
  requestId: string(name='RequestId'),
  code: string(name='Code'),
  message: string(name='Message'),
  httpStatusCode: integer(name='HttpStatusCode'),
  success: boolean(name='Success'),
  warnings: string(name='Warnings'),
  pageNumber: integer(name='PageNumber'),
  pageSize: integer(name='PageSize'),
  totalCount: long(name='TotalCount'),
}

async function listSlaWarningsWithOptions(request: ListSlaWarningsRequest, runtime: Util.RuntimeOptions): ListSlaWarningsResponse {
  Util.validateModel(request);
  return doRequest('ListSlaWarnings', 'HTTPS', 'POST', '2019-08-10', 'AK,APP,BearerToken,PrivateKey', null, request, runtime);
}

async function listSlaWarnings(request: ListSlaWarningsRequest): ListSlaWarningsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listSlaWarningsWithOptions(request, runtime);
}

model ListSlaSnapshotSummaryRequest = {
  planId: string(name='PlanId'),
}

model ListSlaSnapshotSummaryResponse = {
  requestId: string(name='RequestId'),
  code: string(name='Code'),
  message: string(name='Message'),
  httpStatusCode: integer(name='HttpStatusCode'),
  success: boolean(name='Success'),
  slaSummaryVO: string(name='SlaSummaryVO'),
}

async function listSlaSnapshotSummaryWithOptions(request: ListSlaSnapshotSummaryRequest, runtime: Util.RuntimeOptions): ListSlaSnapshotSummaryResponse {
  Util.validateModel(request);
  return doRequest('ListSlaSnapshotSummary', 'HTTPS', 'POST', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', null, request, runtime);
}

async function listSlaSnapshotSummary(request: ListSlaSnapshotSummaryRequest): ListSlaSnapshotSummaryResponse {
  var runtime = new Util.RuntimeOptions{};
  return listSlaSnapshotSummaryWithOptions(request, runtime);
}

model ExecuteSceneFunctionRequest = {
  expression: string(name='Expression'),
}

model ExecuteSceneFunctionResponse = {
  message: string(name='Message'),
  code: string(name='Code'),
  success: boolean(name='Success'),
  requestId: string(name='RequestId'),
  httpStatusCode: integer(name='HttpStatusCode'),
  result: string(name='Result'),
}

async function executeSceneFunctionWithOptions(request: ExecuteSceneFunctionRequest, runtime: Util.RuntimeOptions): ExecuteSceneFunctionResponse {
  Util.validateModel(request);
  return doRequest('ExecuteSceneFunction', 'HTTPS', 'POST', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', null, request, runtime);
}

async function executeSceneFunction(request: ExecuteSceneFunctionRequest): ExecuteSceneFunctionResponse {
  var runtime = new Util.RuntimeOptions{};
  return executeSceneFunctionWithOptions(request, runtime);
}

model DescribeIntranetResourceRequest = {
}

model DescribeIntranetResourceResponse = {
  requestId: string(name='RequestId'),
  message: string(name='Message'),
  code: string(name='Code'),
  success: boolean(name='Success'),
  httpStatusCode: integer(name='HttpStatusCode'),
  intranetResource: string(name='IntranetResource'),
}

async function describeIntranetResourceWithOptions(request: DescribeIntranetResourceRequest, runtime: Util.RuntimeOptions): DescribeIntranetResourceResponse {
  Util.validateModel(request);
  return doRequest('DescribeIntranetResource', 'HTTPS', 'POST', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', null, request, runtime);
}

async function describeIntranetResource(request: DescribeIntranetResourceRequest): DescribeIntranetResourceResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeIntranetResourceWithOptions(request, runtime);
}

model UploadFileFromOSSRequest = {
  ossUrl?: string(name='OssUrl'),
}

model UploadFileFromOSSResponse = {
  requestId: string(name='RequestId'),
  message: string(name='Message'),
  code: string(name='Code'),
  success: boolean(name='Success'),
  httpStatusCode: integer(name='HttpStatusCode'),
  ptsDataFile: {
    fileKey: string(name='FileKey'),
    fileName: string(name='FileName'),
    ossUrl: map[string]any(name='OssUrl'),
    lineCount: long(name='LineCount'),
    skipFirstLine: boolean(name='SkipFirstLine'),
    delimiter: string(name='Delimiter'),
    length: long(name='Length'),
    columns: string(name='Columns'),
    useOnce: boolean(name='UseOnce'),
    gmtCreateTS: long(name='GmtCreateTS'),
  }(name='PtsDataFile'),
}

async function uploadFileFromOSSWithOptions(request: UploadFileFromOSSRequest, runtime: Util.RuntimeOptions): UploadFileFromOSSResponse {
  Util.validateModel(request);
  return doRequest('UploadFileFromOSS', 'HTTPS', 'POST', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', null, request, runtime);
}

async function uploadFileFromOSS(request: UploadFileFromOSSRequest): UploadFileFromOSSResponse {
  var runtime = new Util.RuntimeOptions{};
  return uploadFileFromOSSWithOptions(request, runtime);
}

model ListSlaSnapshotRealRequest = {
  planId: string(name='PlanId'),
}

model ListSlaSnapshotRealResponse = {
  requestId: string(name='RequestId'),
  code: string(name='Code'),
  message: string(name='Message'),
  httpStatusCode: integer(name='HttpStatusCode'),
  success: boolean(name='Success'),
  slaSummaryVO: string(name='SlaSummaryVO'),
}

async function listSlaSnapshotRealWithOptions(request: ListSlaSnapshotRealRequest, runtime: Util.RuntimeOptions): ListSlaSnapshotRealResponse {
  Util.validateModel(request);
  return doRequest('ListSlaSnapshotReal', 'HTTPS', 'POST', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', null, request, runtime);
}

async function listSlaSnapshotReal(request: ListSlaSnapshotRealRequest): ListSlaSnapshotRealResponse {
  var runtime = new Util.RuntimeOptions{};
  return listSlaSnapshotRealWithOptions(request, runtime);
}

model StopSceneTestingRequest = {
  sceneId: string(name='SceneId'),
}

model StopSceneTestingResponse = {
  message: string(name='Message'),
  code: string(name='Code'),
  success: boolean(name='Success'),
  requestId: string(name='RequestId'),
  httpStatusCode: integer(name='HttpStatusCode'),
  isSuccess: boolean(name='IsSuccess'),
}

async function stopSceneTestingWithOptions(request: StopSceneTestingRequest, runtime: Util.RuntimeOptions): StopSceneTestingResponse {
  Util.validateModel(request);
  return doRequest('StopSceneTesting', 'HTTPS', 'POST', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', null, request, runtime);
}

async function stopSceneTesting(request: StopSceneTestingRequest): StopSceneTestingResponse {
  var runtime = new Util.RuntimeOptions{};
  return stopSceneTestingWithOptions(request, runtime);
}

model DescribeSlaTemplateRequest = {
  type?: string(name='Type'),
  pageSize?: integer(name='PageSize'),
  pageNumber?: integer(name='PageNumber'),
}

model DescribeSlaTemplateResponse = {
  requestId: string(name='RequestId'),
  code: string(name='Code'),
  message: string(name='Message'),
  httpStatusCode: integer(name='HttpStatusCode'),
  success: boolean(name='Success'),
  pageNumber: integer(name='PageNumber'),
  pageSize: integer(name='PageSize'),
  totalCount: integer(name='TotalCount'),
  templates: [
    {
      id: string(name='Id'),
      type: string(name='Type'),
      name: string(name='Name'),
      description: string(name='Description'),
      uid: string(name='Uid'),
      modifiedTime: long(name='ModifiedTime'),
      classification: string(name='Classification'),
      businessGroup: string(name='BusinessGroup'),
      businessChildGroup: string(name='BusinessChildGroup'),
      rules: string(name='Rules'),
      deleted: integer(name='Deleted'),
    }
  ](name='Templates'),
}

async function describeSlaTemplateWithOptions(request: DescribeSlaTemplateRequest, runtime: Util.RuntimeOptions): DescribeSlaTemplateResponse {
  Util.validateModel(request);
  return doRequest('DescribeSlaTemplate', 'HTTPS', 'POST', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', null, request, runtime);
}

async function describeSlaTemplate(request: DescribeSlaTemplateRequest): DescribeSlaTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSlaTemplateWithOptions(request, runtime);
}

model StartSceneTestingRequest = {
  sceneId?: string(name='SceneId'),
}

model StartSceneTestingResponse = {
  requestId: string(name='RequestId'),
  success: boolean(name='Success'),
  code: string(name='Code'),
  message: string(name='Message'),
  httpStatusCode: integer(name='HttpStatusCode'),
  planId: string(name='PlanId'),
}

async function startSceneTestingWithOptions(request: StartSceneTestingRequest, runtime: Util.RuntimeOptions): StartSceneTestingResponse {
  Util.validateModel(request);
  return doRequest('StartSceneTesting', 'HTTPS', 'POST', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', null, request, runtime);
}

async function startSceneTesting(request: StartSceneTestingRequest): StartSceneTestingResponse {
  var runtime = new Util.RuntimeOptions{};
  return startSceneTestingWithOptions(request, runtime);
}

model SaveSceneRequest = {
  scene: string(name='Scene'),
}

model SaveSceneResponse = {
  requestId: string(name='RequestId'),
  sceneId: string(name='SceneId'),
  message: string(name='Message'),
  code: string(name='Code'),
  success: boolean(name='Success'),
  httpStatusCode: integer(name='HttpStatusCode'),
  codeKey: string(name='CodeKey'),
}

async function saveSceneWithOptions(request: SaveSceneRequest, runtime: Util.RuntimeOptions): SaveSceneResponse {
  Util.validateModel(request);
  return doRequest('SaveScene', 'HTTPS', 'POST', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', null, request, runtime);
}

async function saveScene(request: SaveSceneRequest): SaveSceneResponse {
  var runtime = new Util.RuntimeOptions{};
  return saveSceneWithOptions(request, runtime);
}

model CreateSceneRequest = {
  scene: string(name='Scene'),
}

model CreateSceneResponse = {
  requestId: string(name='RequestId'),
  sceneId: string(name='SceneId'),
  message: string(name='Message'),
  code: string(name='Code'),
  success: boolean(name='Success'),
  httpStatusCode: integer(name='HttpStatusCode'),
  codeKey: string(name='CodeKey'),
}

async function createSceneWithOptions(request: CreateSceneRequest, runtime: Util.RuntimeOptions): CreateSceneResponse {
  Util.validateModel(request);
  return doRequest('CreateScene', 'HTTPS', 'POST', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', null, request, runtime);
}

async function createScene(request: CreateSceneRequest): CreateSceneResponse {
  var runtime = new Util.RuntimeOptions{};
  return createSceneWithOptions(request, runtime);
}

model ChangePressureRequest = {
  routeRequestBody?: map[string]any(name='RouteRequestBody'),
}

model ChangePressureResponse = {
  requestId: string(name='RequestId'),
  message: string(name='Message'),
  code: string(name='Code'),
  routeResponseBody: string(name='RouteResponseBody'),
  success: string(name='Success'),
}

async function changePressureWithOptions(request: ChangePressureRequest, runtime: Util.RuntimeOptions): ChangePressureResponse {
  Util.validateModel(request);
  return doRequest('ChangePressure', 'HTTPS', 'POST', '2019-08-10', 'AK', null, request, runtime);
}

async function changePressure(request: ChangePressureRequest): ChangePressureResponse {
  var runtime = new Util.RuntimeOptions{};
  return changePressureWithOptions(request, runtime);
}

model ListEnginesRequest = {
  routeRequestBody?: map[string]any(name='RouteRequestBody'),
}

model ListEnginesResponse = {
  requestId: string(name='RequestId'),
  code: string(name='Code'),
  message: string(name='Message'),
  routeResponseBody: string(name='RouteResponseBody'),
  success: string(name='Success'),
}

async function listEnginesWithOptions(request: ListEnginesRequest, runtime: Util.RuntimeOptions): ListEnginesResponse {
  Util.validateModel(request);
  return doRequest('ListEngines', 'HTTPS', 'POST', '2019-08-10', 'AK', null, request, runtime);
}

async function listEngines(request: ListEnginesRequest): ListEnginesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listEnginesWithOptions(request, runtime);
}

model DescribeRealTimeLogRequest = {
  routeRequestBody?: map[string]any(name='RouteRequestBody'),
}

model DescribeRealTimeLogResponse = {
  code: string(name='Code'),
  message: string(name='Message'),
  requestId: string(name='RequestId'),
  routeResponseBody: string(name='RouteResponseBody'),
  success: string(name='Success'),
}

async function describeRealTimeLogWithOptions(request: DescribeRealTimeLogRequest, runtime: Util.RuntimeOptions): DescribeRealTimeLogResponse {
  Util.validateModel(request);
  return doRequest('DescribeRealTimeLog', 'HTTPS', 'POST', '2019-08-10', 'AK', null, request, runtime);
}

async function describeRealTimeLog(request: DescribeRealTimeLogRequest): DescribeRealTimeLogResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeRealTimeLogWithOptions(request, runtime);
}

model DescribeStructureMonitorAuthRequest = {
}

model DescribeStructureMonitorAuthResponse = {
  requestId: string(name='RequestId'),
  structureNew: boolean(name='StructureNew'),
  code: string(name='Code'),
  message: string(name='Message'),
  success: boolean(name='Success'),
  httpStatusCode: integer(name='HttpStatusCode'),
}

async function describeStructureMonitorAuthWithOptions(request: DescribeStructureMonitorAuthRequest, runtime: Util.RuntimeOptions): DescribeStructureMonitorAuthResponse {
  Util.validateModel(request);
  return doRequest('DescribeStructureMonitorAuth', 'HTTPS', 'GET', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', request, null, runtime);
}

async function describeStructureMonitorAuth(request: DescribeStructureMonitorAuthRequest): DescribeStructureMonitorAuthResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeStructureMonitorAuthWithOptions(request, runtime);
}

model DescribeJMeterSampleSummaryRequest = {
  reportId: string(name='ReportId'),
  samplerId: integer(name='SamplerId'),
}

model DescribeJMeterSampleSummaryResponse = {
  requestId: string(name='RequestId'),
  code: string(name='Code'),
  message: string(name='Message'),
  httpStatusCode: integer(name='HttpStatusCode'),
  success: boolean(name='Success'),
  concurrencyRtStat: map[string]any(name='ConcurrencyRtStat'),
  concurrencyTpsStat: map[string]any(name='ConcurrencyTpsStat'),
  rtDistribution: map[string]any(name='RtDistribution'),
}

async function describeJMeterSampleSummaryWithOptions(request: DescribeJMeterSampleSummaryRequest, runtime: Util.RuntimeOptions): DescribeJMeterSampleSummaryResponse {
  Util.validateModel(request);
  return doRequest('DescribeJMeterSampleSummary', 'HTTPS', 'POST', '2019-08-10', 'AK', null, request, runtime);
}

async function describeJMeterSampleSummary(request: DescribeJMeterSampleSummaryRequest): DescribeJMeterSampleSummaryResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeJMeterSampleSummaryWithOptions(request, runtime);
}

model CloneJMeterSceneRequest = {
  sceneId: string(name='SceneId'),
}

model CloneJMeterSceneResponse = {
  requestId: string(name='RequestId'),
  sceneId: string(name='SceneId'),
  code: string(name='Code'),
  message: string(name='Message'),
  success: boolean(name='Success'),
  httpStatusCode: integer(name='HttpStatusCode'),
}

async function cloneJMeterSceneWithOptions(request: CloneJMeterSceneRequest, runtime: Util.RuntimeOptions): CloneJMeterSceneResponse {
  Util.validateModel(request);
  return doRequest('CloneJMeterScene', 'HTTPS', 'POST', '2019-08-10', 'AK', null, request, runtime);
}

async function cloneJMeterScene(request: CloneJMeterSceneRequest): CloneJMeterSceneResponse {
  var runtime = new Util.RuntimeOptions{};
  return cloneJMeterSceneWithOptions(request, runtime);
}

model AdjustJMeterSpeedRequest = {
  sceneId?: string(name='SceneId'),
  loadMode?: string(name='LoadMode'),
  speed?: integer(name='Speed'),
}

model AdjustJMeterSpeedResponse = {
  requestId: string(name='RequestId'),
  success: boolean(name='Success'),
  code: string(name='Code'),
  message: string(name='Message'),
  httpStatusCode: integer(name='HttpStatusCode'),
}

async function adjustJMeterSpeedWithOptions(request: AdjustJMeterSpeedRequest, runtime: Util.RuntimeOptions): AdjustJMeterSpeedResponse {
  Util.validateModel(request);
  return doRequest('AdjustJMeterSpeed', 'HTTPS', 'POST', '2019-08-10', 'AK', null, request, runtime);
}

async function adjustJMeterSpeed(request: AdjustJMeterSpeedRequest): AdjustJMeterSpeedResponse {
  var runtime = new Util.RuntimeOptions{};
  return adjustJMeterSpeedWithOptions(request, runtime);
}

model DescribeJMeterSamplingLogsRequest = {
  pageNumber: integer(name='PageNumber'),
  pageSize: integer(name='PageSize'),
  beginTime?: long(name='BeginTime'),
  endTime?: long(name='EndTime'),
  reportId: string(name='ReportId'),
  taskId?: long(name='TaskId'),
  samplerId?: integer(name='SamplerId'),
  success?: boolean(name='Success'),
  thread?: string(name='Thread'),
  keyword?: string(name='Keyword'),
  rtRange?: string(name='RtRange'),
}

model DescribeJMeterSamplingLogsResponse = {
  requestId: string(name='RequestId'),
  code: string(name='Code'),
  httpStatusCode: integer(name='HttpStatusCode'),
  message: string(name='Message'),
  success: boolean(name='Success'),
  pageNumber: integer(name='PageNumber'),
  pageSize: integer(name='PageSize'),
  totalCount: long(name='TotalCount'),
  sampleResults: [ string ] (name='SampleResults'),
}

async function describeJMeterSamplingLogsWithOptions(request: DescribeJMeterSamplingLogsRequest, runtime: Util.RuntimeOptions): DescribeJMeterSamplingLogsResponse {
  Util.validateModel(request);
  return doRequest('DescribeJMeterSamplingLogs', 'HTTPS', 'POST', '2019-08-10', 'AK', null, request, runtime);
}

async function describeJMeterSamplingLogs(request: DescribeJMeterSamplingLogsRequest): DescribeJMeterSamplingLogsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeJMeterSamplingLogsWithOptions(request, runtime);
}

model DescribeAgentNetTrafficRequest = {
  reportId: string(name='ReportId'),
  taskId: long(name='TaskId'),
  beginTime?: long(name='BeginTime'),
  endTime?: long(name='EndTime'),
}

model DescribeAgentNetTrafficResponse = {
  requestId: string(name='RequestId'),
  code: string(name='Code'),
  message: string(name='Message'),
  httpStatusCode: integer(name='HttpStatusCode'),
  success: boolean(name='Success'),
  netTrafficInfo: [ map[string]any ] (name='NetTrafficInfo'),
}

async function describeAgentNetTrafficWithOptions(request: DescribeAgentNetTrafficRequest, runtime: Util.RuntimeOptions): DescribeAgentNetTrafficResponse {
  Util.validateModel(request);
  return doRequest('DescribeAgentNetTraffic', 'HTTPS', 'POST', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', null, request, runtime);
}

async function describeAgentNetTraffic(request: DescribeAgentNetTrafficRequest): DescribeAgentNetTrafficResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAgentNetTrafficWithOptions(request, runtime);
}

model DescribeAgentCpuInfoRequest = {
  reportId: string(name='ReportId'),
  taskId: long(name='TaskId'),
  beginTime?: long(name='BeginTime'),
  endTime?: long(name='EndTime'),
}

model DescribeAgentCpuInfoResponse = {
  requestId: string(name='RequestId'),
  code: string(name='Code'),
  message: string(name='Message'),
  success: boolean(name='Success'),
  httpStatusCode: integer(name='HttpStatusCode'),
  cpuInfo: [ map[string]any ] (name='CpuInfo'),
}

async function describeAgentCpuInfoWithOptions(request: DescribeAgentCpuInfoRequest, runtime: Util.RuntimeOptions): DescribeAgentCpuInfoResponse {
  Util.validateModel(request);
  return doRequest('DescribeAgentCpuInfo', 'HTTPS', 'POST', '2019-08-10', 'AK,APP,PrivateKey', null, request, runtime);
}

async function describeAgentCpuInfo(request: DescribeAgentCpuInfoRequest): DescribeAgentCpuInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAgentCpuInfoWithOptions(request, runtime);
}

model DescribeAgentGCInfoRequest = {
  reportId: string(name='ReportId'),
  taskId: long(name='TaskId'),
  beginTime?: long(name='BeginTime'),
  endTime?: long(name='EndTime'),
}

model DescribeAgentGCInfoResponse = {
  requestId: string(name='RequestId'),
  code: string(name='Code'),
  message: string(name='Message'),
  success: boolean(name='Success'),
  httpStatusCode: integer(name='HttpStatusCode'),
  gcInfo: [ map[string]any ] (name='GcInfo'),
}

async function describeAgentGCInfoWithOptions(request: DescribeAgentGCInfoRequest, runtime: Util.RuntimeOptions): DescribeAgentGCInfoResponse {
  Util.validateModel(request);
  return doRequest('DescribeAgentGCInfo', 'HTTPS', 'POST', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', null, request, runtime);
}

async function describeAgentGCInfo(request: DescribeAgentGCInfoRequest): DescribeAgentGCInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAgentGCInfoWithOptions(request, runtime);
}

model DescribeAgentMemoryInfoRequest = {
  reportId: string(name='ReportId'),
  taskId: long(name='TaskId'),
  beginTime?: long(name='BeginTime'),
  endTime?: long(name='EndTime'),
}

model DescribeAgentMemoryInfoResponse = {
  requestId: string(name='RequestId'),
  code: string(name='Code'),
  message: string(name='Message'),
  httpStatusCode: integer(name='HttpStatusCode'),
  success: boolean(name='Success'),
  memoryInfo: [ map[string]any ] (name='MemoryInfo'),
}

async function describeAgentMemoryInfoWithOptions(request: DescribeAgentMemoryInfoRequest, runtime: Util.RuntimeOptions): DescribeAgentMemoryInfoResponse {
  Util.validateModel(request);
  return doRequest('DescribeAgentMemoryInfo', 'HTTPS', 'POST', '2019-08-10', 'AK', null, request, runtime);
}

async function describeAgentMemoryInfo(request: DescribeAgentMemoryInfoRequest): DescribeAgentMemoryInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAgentMemoryInfoWithOptions(request, runtime);
}

model DescribeAgentLoadInfoRequest = {
  reportId: string(name='ReportId'),
  taskId: long(name='TaskId'),
  beginTime?: long(name='BeginTime'),
  endTime?: long(name='EndTime'),
}

model DescribeAgentLoadInfoResponse = {
  requestId: string(name='RequestId'),
  code: string(name='Code'),
  message: string(name='Message'),
  httpStatusCode: integer(name='HttpStatusCode'),
  success: boolean(name='Success'),
  loadInfo: [ map[string]any ] (name='LoadInfo'),
}

async function describeAgentLoadInfoWithOptions(request: DescribeAgentLoadInfoRequest, runtime: Util.RuntimeOptions): DescribeAgentLoadInfoResponse {
  Util.validateModel(request);
  return doRequest('DescribeAgentLoadInfo', 'HTTPS', 'POST', '2019-08-10', 'AK', null, request, runtime);
}

async function describeAgentLoadInfo(request: DescribeAgentLoadInfoRequest): DescribeAgentLoadInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeAgentLoadInfoWithOptions(request, runtime);
}

model DescribeJMeterPlanRequest = {
  reportId: string(name='ReportId'),
}

model DescribeJMeterPlanResponse = {
  requestId: string(name='RequestId'),
  message: string(name='Message'),
  code: string(name='Code'),
  success: boolean(name='Success'),
  httpStatusCode: integer(name='HttpStatusCode'),
  report: string(name='Report'),
}

async function describeJMeterPlanWithOptions(request: DescribeJMeterPlanRequest, runtime: Util.RuntimeOptions): DescribeJMeterPlanResponse {
  Util.validateModel(request);
  return doRequest('DescribeJMeterPlan', 'HTTPS', 'POST', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', null, request, runtime);
}

async function describeJMeterPlan(request: DescribeJMeterPlanRequest): DescribeJMeterPlanResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeJMeterPlanWithOptions(request, runtime);
}

model DescribeJMeterSceneRequest = {
  sceneId: string(name='SceneId'),
}

model DescribeJMeterSceneResponse = {
  requestId: string(name='RequestId'),
  message: string(name='Message'),
  code: string(name='Code'),
  success: boolean(name='Success'),
  httpStatusCode: integer(name='HttpStatusCode'),
  scene: {
    name: string(name='Name'),
    pool: string(name='Pool'),
    JMeterVersion: string(name='JMeterVersion'),
    concurrency: integer(name='Concurrency'),
    rampUp: integer(name='RampUp'),
    holdFor: integer(name='HoldFor'),
    useIterations: boolean(name='UseIterations'),
    iterations: integer(name='Iterations'),
    maxConcurrencyPerAgent: integer(name='MaxConcurrencyPerAgent'),
    specifyAgentCount: boolean(name='SpecifyAgentCount'),
    agentCount: integer(name='AgentCount'),
    splitCsv: boolean(name='SplitCsv'),
    testFile: string(name='TestFile'),
    fileList: string(name='FileList'),
    regionId: string(name='RegionId'),
    vpcId: string(name='VpcId'),
    securityGroupId: string(name='SecurityGroupId'),
    vSwitchId: string(name='VSwitchId'),
    sceneId: string(name='SceneId'),
    conditionSatisfiedExactly: boolean(name='ConditionSatisfiedExactly'),
    syncTimerType: string(name='SyncTimerType'),
    steps: integer(name='Steps'),
    constantThroughputTimerType: string(name='ConstantThroughputTimerType'),
    environmentId: string(name='EnvironmentId'),
    isCronable: boolean(name='IsCronable'),
    condition: [
      {
        region: string(name='Region'),
        isp: string(name='Isp'),
        amount: integer(name='Amount'),
      }
    ](name='Condition'),
    plan: {
      modifiedTime: long(name='ModifiedTime'),
      lastActive: long(name='LastActive'),
      vum: long(name='Vum'),
      hasReport: boolean(name='HasReport'),
      vumWeight: long(name='VumWeight'),
      beginTime: long(name='BeginTime'),
    }(name='Plan'),
  }(name='Scene'),
}

async function describeJMeterSceneWithOptions(request: DescribeJMeterSceneRequest, runtime: Util.RuntimeOptions): DescribeJMeterSceneResponse {
  Util.validateModel(request);
  return doRequest('DescribeJMeterScene', 'HTTPS', 'POST', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', null, request, runtime);
}

async function describeJMeterScene(request: DescribeJMeterSceneRequest): DescribeJMeterSceneResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeJMeterSceneWithOptions(request, runtime);
}

model DescribeJMeterSceneRunningStatusRequest = {
  sceneId: string(name='SceneId'),
}

model DescribeJMeterSceneRunningStatusResponse = {
  requestId: string(name='RequestId'),
  message: string(name='Message'),
  code: string(name='Code'),
  success: boolean(name='Success'),
  httpStatusCode: integer(name='HttpStatusCode'),
  scene: {
    name: string(name='Name'),
    pool: string(name='Pool'),
    jmeterVersion: string(name='JmeterVersion'),
    concurrency: integer(name='Concurrency'),
    rampUp: integer(name='RampUp'),
    holdFor: integer(name='HoldFor'),
    useIterations: boolean(name='UseIterations'),
    iterations: integer(name='Iterations'),
    maxConcurrencyPerAgent: integer(name='MaxConcurrencyPerAgent'),
    specifyAgentCount: boolean(name='SpecifyAgentCount'),
    agentCount: integer(name='AgentCount'),
    splitCsv: boolean(name='SplitCsv'),
    testFile: string(name='TestFile'),
    plan: string(name='Plan'),
    steps: integer(name='Steps'),
  }(name='Scene'),
}

async function describeJMeterSceneRunningStatusWithOptions(request: DescribeJMeterSceneRunningStatusRequest, runtime: Util.RuntimeOptions): DescribeJMeterSceneRunningStatusResponse {
  Util.validateModel(request);
  return doRequest('DescribeJMeterSceneRunningStatus', 'HTTPS', 'POST', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', null, request, runtime);
}

async function describeJMeterSceneRunningStatus(request: DescribeJMeterSceneRunningStatusRequest): DescribeJMeterSceneRunningStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeJMeterSceneRunningStatusWithOptions(request, runtime);
}

model DescribeJMeterTaskListRequest = {
  pageNumber: integer(name='PageNumber'),
  pageSize: integer(name='PageSize'),
  reportId?: string(name='ReportId'),
}

model DescribeJMeterTaskListResponse = {
  requestId: string(name='RequestId'),
  code: string(name='Code'),
  message: string(name='Message'),
  success: boolean(name='Success'),
  pageNumber: integer(name='PageNumber'),
  pageSize: integer(name='PageSize'),
  totalCount: long(name='TotalCount'),
  taskList: string(name='TaskList'),
}

async function describeJMeterTaskListWithOptions(request: DescribeJMeterTaskListRequest, runtime: Util.RuntimeOptions): DescribeJMeterTaskListResponse {
  Util.validateModel(request);
  return doRequest('DescribeJMeterTaskList', 'HTTPS', 'POST', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', null, request, runtime);
}

async function describeJMeterTaskList(request: DescribeJMeterTaskListRequest): DescribeJMeterTaskListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeJMeterTaskListWithOptions(request, runtime);
}

model DescribeJMeterLogsRequest = {
  pageNumber: integer(name='PageNumber'),
  pageSize: integer(name='PageSize'),
  reportId?: string(name='ReportId'),
  beginTime?: long(name='BeginTime'),
  endTime?: long(name='EndTime'),
  taskId?: long(name='TaskId'),
  thread?: string(name='Thread'),
  level?: string(name='Level'),
  loggerName?: string(name='LoggerName'),
  keyword?: string(name='Keyword'),
}

model DescribeJMeterLogsResponse = {
  requestId: string(name='RequestId'),
  code: string(name='Code'),
  message: string(name='Message'),
  success: boolean(name='Success'),
  pageNumber: integer(name='PageNumber'),
  pageSize: integer(name='PageSize'),
  totalCount: long(name='TotalCount'),
  logs: string(name='Logs'),
}

async function describeJMeterLogsWithOptions(request: DescribeJMeterLogsRequest, runtime: Util.RuntimeOptions): DescribeJMeterLogsResponse {
  Util.validateModel(request);
  return doRequest('DescribeJMeterLogs', 'HTTPS', 'POST', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', null, request, runtime);
}

async function describeJMeterLogs(request: DescribeJMeterLogsRequest): DescribeJMeterLogsResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeJMeterLogsWithOptions(request, runtime);
}

model StopJMeterTestingRequest = {
  sceneId: string(name='SceneId'),
}

model StopJMeterTestingResponse = {
  requestId: string(name='RequestId'),
  message: string(name='Message'),
  code: string(name='Code'),
  success: boolean(name='Success'),
  httpStatusCode: integer(name='HttpStatusCode'),
}

async function stopJMeterTestingWithOptions(request: StopJMeterTestingRequest, runtime: Util.RuntimeOptions): StopJMeterTestingResponse {
  Util.validateModel(request);
  return doRequest('StopJMeterTesting', 'HTTPS', 'POST', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', null, request, runtime);
}

async function stopJMeterTesting(request: StopJMeterTestingRequest): StopJMeterTestingResponse {
  var runtime = new Util.RuntimeOptions{};
  return stopJMeterTestingWithOptions(request, runtime);
}

model DescribeSampleMetricRequest = {
  reportId?: string(name='ReportId'),
  samplerId?: integer(name='SamplerId'),
  beginTime?: long(name='BeginTime'),
  endTime?: long(name='EndTime'),
}

model DescribeSampleMetricResponse = {
  requestId: string(name='RequestId'),
  code: string(name='Code'),
  message: string(name='Message'),
  success: boolean(name='Success'),
  httpStatusCode: integer(name='HttpStatusCode'),
  sampleMetricList: string(name='SampleMetricList'),
}

async function describeSampleMetricWithOptions(request: DescribeSampleMetricRequest, runtime: Util.RuntimeOptions): DescribeSampleMetricResponse {
  Util.validateModel(request);
  return doRequest('DescribeSampleMetric', 'HTTPS', 'POST', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', null, request, runtime);
}

async function describeSampleMetric(request: DescribeSampleMetricRequest): DescribeSampleMetricResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSampleMetricWithOptions(request, runtime);
}

model DescribeJMeterChainDetailRequest = {
  pageNumber: integer(name='PageNumber'),
  pageSize: integer(name='PageSize'),
  reportId?: string(name='ReportId'),
  beginTime?: long(name='BeginTime'),
  endTime?: long(name='EndTime'),
  taskId?: long(name='TaskId'),
  thread?: long(name='Thread'),
  kw?: string(name='Kw'),
  samplerId?: integer(name='SamplerId'),
  success?: boolean(name='Success'),
}

model DescribeJMeterChainDetailResponse = {
  requestId: string(name='RequestId'),
  code: string(name='Code'),
  message: string(name='Message'),
  success: boolean(name='Success'),
  pageNumber: integer(name='PageNumber'),
  pageSize: integer(name='PageSize'),
  totalCount: long(name='TotalCount'),
  sampleResults: string(name='SampleResults'),
}

async function describeJMeterChainDetailWithOptions(request: DescribeJMeterChainDetailRequest, runtime: Util.RuntimeOptions): DescribeJMeterChainDetailResponse {
  Util.validateModel(request);
  return doRequest('DescribeJMeterChainDetail', 'HTTPS', 'POST', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', null, request, runtime);
}

async function describeJMeterChainDetail(request: DescribeJMeterChainDetailRequest): DescribeJMeterChainDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeJMeterChainDetailWithOptions(request, runtime);
}

model StartJMeterTestingRequest = {
  sceneId: string(name='SceneId'),
}

model StartJMeterTestingResponse = {
  requestId: string(name='RequestId'),
  message: string(name='Message'),
  code: string(name='Code'),
  success: boolean(name='Success'),
  httpStatusCode: integer(name='HttpStatusCode'),
  planId: string(name='PlanId'),
}

async function startJMeterTestingWithOptions(request: StartJMeterTestingRequest, runtime: Util.RuntimeOptions): StartJMeterTestingResponse {
  Util.validateModel(request);
  return doRequest('StartJMeterTesting', 'HTTPS', 'POST', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', null, request, runtime);
}

async function startJMeterTesting(request: StartJMeterTestingRequest): StartJMeterTestingResponse {
  var runtime = new Util.RuntimeOptions{};
  return startJMeterTestingWithOptions(request, runtime);
}

model RemoveInstanceFromGroupRequest = {
  groupId: long(name='GroupId'),
  instanceIdAndPorts: map[string]any(name='InstanceIdAndPorts'),
  ver: long(name='Ver'),
}

model RemoveInstanceFromGroupResponse = {
  requestId: string(name='RequestId'),
  code: string(name='Code'),
  message: string(name='Message'),
  httpStatusCode: integer(name='HttpStatusCode'),
  success: boolean(name='Success'),
}

async function removeInstanceFromGroupWithOptions(request: RemoveInstanceFromGroupRequest, runtime: Util.RuntimeOptions): RemoveInstanceFromGroupResponse {
  Util.validateModel(request);
  return doRequest('RemoveInstanceFromGroup', 'HTTPS', 'POST', '2019-08-10', 'AK', null, request, runtime);
}

async function removeInstanceFromGroup(request: RemoveInstanceFromGroupRequest): RemoveInstanceFromGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeInstanceFromGroupWithOptions(request, runtime);
}

model ReplaceOssFileRequest = {
  sceneId: string(name='SceneId'),
  originalOssFileUrl: string(name='OriginalOssFileUrl'),
  newOssFileUrl: string(name='NewOssFileUrl'),
  jobId?: string(name='JobId'),
}

model ReplaceOssFileResponse = {
  requestId: string(name='RequestId'),
  code: string(name='Code'),
  message: string(name='Message'),
  httpStatusCode: integer(name='HttpStatusCode'),
  success: boolean(name='Success'),
  finished: boolean(name='Finished'),
  jobId: string(name='JobId'),
  timeout: integer(name='Timeout'),
}

async function replaceOssFileWithOptions(request: ReplaceOssFileRequest, runtime: Util.RuntimeOptions): ReplaceOssFileResponse {
  Util.validateModel(request);
  return doRequest('ReplaceOssFile', 'HTTPS', 'POST', '2019-08-10', 'AK', null, request, runtime);
}

async function replaceOssFile(request: ReplaceOssFileRequest): ReplaceOssFileResponse {
  var runtime = new Util.RuntimeOptions{};
  return replaceOssFileWithOptions(request, runtime);
}

model StartTestingRequest = {
  sceneId: string(name='SceneId'),
}

model StartTestingResponse = {
  requestId: string(name='RequestId'),
  code: string(name='Code'),
  message: string(name='Message'),
  httpStatusCode: integer(name='HttpStatusCode'),
  success: boolean(name='Success'),
  sceneId: string(name='SceneId'),
  reportId: string(name='ReportId'),
}

async function startTestingWithOptions(request: StartTestingRequest, runtime: Util.RuntimeOptions): StartTestingResponse {
  Util.validateModel(request);
  return doRequest('StartTesting', 'HTTPS', 'GET', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', request, null, runtime);
}

async function startTesting(request: StartTestingRequest): StartTestingResponse {
  var runtime = new Util.RuntimeOptions{};
  return startTestingWithOptions(request, runtime);
}

model StopTestingRequest = {
  sceneId: string(name='SceneId'),
}

model StopTestingResponse = {
  requestId: string(name='RequestId'),
  code: string(name='Code'),
  message: string(name='Message'),
  httpStatusCode: integer(name='HttpStatusCode'),
  success: boolean(name='Success'),
}

async function stopTestingWithOptions(request: StopTestingRequest, runtime: Util.RuntimeOptions): StopTestingResponse {
  Util.validateModel(request);
  return doRequest('StopTesting', 'HTTPS', 'GET', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', request, null, runtime);
}

async function stopTesting(request: StopTestingRequest): StopTestingResponse {
  var runtime = new Util.RuntimeOptions{};
  return stopTestingWithOptions(request, runtime);
}

model ListReportsRequest = {
  keyword?: string(name='Keyword'),
  pageSize: integer(name='PageSize'),
  sceneType?: string(name='SceneType'),
  beginTime?: long(name='BeginTime'),
  endTime?: long(name='EndTime'),
  pageNumber: integer(name='PageNumber'),
  sceneId?: string(name='SceneId'),
}

model ListReportsResponse = {
  pageNumber: integer(name='PageNumber'),
  code: string(name='Code'),
  requestId: string(name='RequestId'),
  success: boolean(name='Success'),
  pageSize: integer(name='PageSize'),
  totalCount: integer(name='TotalCount'),
  message: string(name='Message'),
  httpStatusCode: integer(name='HttpStatusCode'),
  reports: [
    {
      reportId: string(name='ReportId'),
      sceneId: string(name='SceneId'),
      sceneName: string(name='SceneName'),
      sceneType: string(name='SceneType'),
      maxConcurrency: integer(name='MaxConcurrency'),
      vum: integer(name='Vum'),
      duration: string(name='Duration'),
      beginTime: long(name='BeginTime'),
      sceneDeleted: boolean(name='SceneDeleted'),
      useCustomPool: boolean(name='UseCustomPool'),
    }
  ](name='Reports'),
}

async function listReportsWithOptions(request: ListReportsRequest, runtime: Util.RuntimeOptions): ListReportsResponse {
  Util.validateModel(request);
  return doRequest('ListReports', 'HTTPS', 'POST', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', null, request, runtime);
}

async function listReports(request: ListReportsRequest): ListReportsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listReportsWithOptions(request, runtime);
}

model DescribeReportChainDetailRequest = {
  reportId: string(name='ReportId'),
  chainId?: long(name='ChainId'),
  beginTime?: long(name='BeginTime'),
  endTime?: long(name='EndTime'),
}

model DescribeReportChainDetailResponse = {
  message: string(name='Message'),
  httpStatusCode: integer(name='HttpStatusCode'),
  success: boolean(name='Success'),
  requestId: string(name='RequestId'),
  code: string(name='Code'),
  chainDetails: [
    {
      totalFail: long(name='TotalFail'),
      qpsFail: float(name='QpsFail'),
      total3XX: long(name='Total3XX'),
      realConcurrency: float(name='RealConcurrency'),
      timePoint: long(name='TimePoint'),
      maxRt: integer(name='MaxRt'),
      minRt: integer(name='MinRt'),
      totalRequest: long(name='TotalRequest'),
      qps2XX: float(name='Qps2XX'),
      total4XX: long(name='Total4XX'),
      total5XX: long(name='Total5XX'),
      qps4XX: float(name='Qps4XX'),
      realQps: float(name='RealQps'),
      configQps: integer(name='ConfigQps'),
      averageRt: integer(name='AverageRt'),
      bpsRequest: long(name='BpsRequest'),
      chainId: long(name='ChainId'),
      bpsResponse: long(name='BpsResponse'),
      total2XX: long(name='Total2XX'),
      qps5XX: float(name='Qps5XX'),
      qps3XX: float(name='Qps3XX'),
      qpsHit: float(name='QpsHit'),
      qpsMiss: float(name='QpsMiss'),
      totalHit: long(name='TotalHit'),
      totalMiss: long(name='TotalMiss'),
    }
  ](name='ChainDetails'),
}

async function describeReportChainDetailWithOptions(request: DescribeReportChainDetailRequest, runtime: Util.RuntimeOptions): DescribeReportChainDetailResponse {
  Util.validateModel(request);
  return doRequest('DescribeReportChainDetail', 'HTTPS', 'POST', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', null, request, runtime);
}

async function describeReportChainDetail(request: DescribeReportChainDetailRequest): DescribeReportChainDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeReportChainDetailWithOptions(request, runtime);
}

model DescribeReportChainSummaryRequest = {
  reportId: string(name='ReportId'),
}

model DescribeReportChainSummaryResponse = {
  message: string(name='Message'),
  httpStatusCode: integer(name='HttpStatusCode'),
  requestId: string(name='RequestId'),
  code: string(name='Code'),
  success: boolean(name='Success'),
  chainSummary: [
    {
      chainId: long(name='ChainId'),
      averageTps: float(name='AverageTps'),
      succeedRequestRate: float(name='SucceedRequestRate'),
      hasCheckPoint: boolean(name='HasCheckPoint'),
      chainName: string(name='ChainName'),
      totalRequest: long(name='TotalRequest'),
      count5XX: long(name='Count5XX'),
      relationName: string(name='RelationName'),
      count4XX: long(name='Count4XX'),
      countTimeout: long(name='CountTimeout'),
      seg75Rt: long(name='Seg75Rt'),
      failedBusinessCount: long(name='FailedBusinessCount'),
      failedRequestCount: long(name='FailedRequestCount'),
      seg90Rt: long(name='Seg90Rt'),
      maxRt: integer(name='MaxRt'),
      minRt: integer(name='MinRt'),
      count3XX: long(name='Count3XX'),
      averageRt: float(name='AverageRt'),
      relationId: long(name='RelationId'),
      succeedBusinessRate: float(name='SucceedBusinessRate'),
      seg50Rt: integer(name='Seg50Rt'),
      seg99Rt: integer(name='Seg99Rt'),
      averageConcurrency: float(name='AverageConcurrency'),
      exceptions: string(name='Exceptions'),
    }
  ](name='ChainSummary'),
}

async function describeReportChainSummaryWithOptions(request: DescribeReportChainSummaryRequest, runtime: Util.RuntimeOptions): DescribeReportChainSummaryResponse {
  Util.validateModel(request);
  return doRequest('DescribeReportChainSummary', 'HTTPS', 'POST', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', null, request, runtime);
}

async function describeReportChainSummary(request: DescribeReportChainSummaryRequest): DescribeReportChainSummaryResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeReportChainSummaryWithOptions(request, runtime);
}

model RemoveScenesRequest = {
  sceneIds: map[string]any(name='SceneIds'),
}

model RemoveScenesResponse = {
  requestId: string(name='RequestId'),
  message: string(name='Message'),
  code: string(name='Code'),
  success: boolean(name='Success'),
  httpStatusCode: integer(name='HttpStatusCode'),
}

async function removeScenesWithOptions(request: RemoveScenesRequest, runtime: Util.RuntimeOptions): RemoveScenesResponse {
  Util.validateModel(request);
  return doRequest('RemoveScenes', 'HTTPS', 'GET', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', request, null, runtime);
}

async function removeScenes(request: RemoveScenesRequest): RemoveScenesResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeScenesWithOptions(request, runtime);
}

model DescribeReportRequest = {
  reportId: string(name='ReportId'),
}

model DescribeReportResponse = {
  averageConcurrency: integer(name='AverageConcurrency'),
  avgBw: long(name='AvgBw'),
  successRateReq: float(name='SuccessRateReq'),
  endTimeTS: long(name='EndTimeTS'),
  startTimeTS: long(name='StartTimeTS'),
  totalAgents: integer(name='TotalAgents'),
  requestCount: long(name='RequestCount'),
  rpsLimit: long(name='RpsLimit'),
  aliveAgents: integer(name='AliveAgents'),
  maxTps: long(name='MaxTps'),
  concurrencyLimit: long(name='ConcurrencyLimit'),
  maxConcurrency: long(name='MaxConcurrency'),
  sceneDeleted: boolean(name='SceneDeleted'),
  duration: string(name='Duration'),
  maxBw: long(name='MaxBw'),
  vum: long(name='Vum'),
  failCountBiz: long(name='FailCountBiz'),
  failCountReq: long(name='FailCountReq'),
  successRateBiz: float(name='SuccessRateBiz'),
  requestId: string(name='RequestId'),
  code: string(name='Code'),
  message: string(name='Message'),
  httpStatusCode: integer(name='HttpStatusCode'),
  success: boolean(name='Success'),
  reportView: string(name='ReportView'),
  chargeType: string(name='ChargeType'),
  agentsLocations: string(name='AgentsLocations'),
  relations: [
    {
      name: string(name='Name'),
      id: long(name='Id'),
      disabled: boolean(name='Disabled'),
      headers: map[string]any(name='Headers'),
      relationTestConfig: map[string]any(name='RelationTestConfig'),
      nodes: [
        {
          type: string(name='Type'),
          id: long(name='Id'),
          name: string(name='Name'),
          config: map[string]any(name='Config'),
        }
      ](name='Nodes'),
    }
  ](name='Relations'),
  sceneSnapshot: {
    type: string(name='Type'),
    sceneName: string(name='SceneName'),
    testConfig: string(name='TestConfig'),
    status: integer(name='Status'),
    execStatus: string(name='ExecStatus'),
  }(name='SceneSnapshot'),
}

async function describeReportWithOptions(request: DescribeReportRequest, runtime: Util.RuntimeOptions): DescribeReportResponse {
  Util.validateModel(request);
  return doRequest('DescribeReport', 'HTTPS', 'POST', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', null, request, runtime);
}

async function describeReport(request: DescribeReportRequest): DescribeReportResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeReportWithOptions(request, runtime);
}

model ListScenesRequest = {
  keywords?: string(name='Keywords'),
  pageNumber: integer(name='PageNumber'),
  pageSize: integer(name='PageSize'),
}

model ListScenesResponse = {
  requestId: string(name='RequestId'),
  code: string(name='Code'),
  message: string(name='Message'),
  success: boolean(name='Success'),
  pageNumber: integer(name='PageNumber'),
  pageSize: integer(name='PageSize'),
  totalCount: long(name='TotalCount'),
  scenes: [
    {
      sceneId: string(name='SceneId'),
      sceneName: string(name='SceneName'),
      duration: integer(name='Duration'),
      modifiedTime: long(name='ModifiedTime'),
      sceneType: string(name='SceneType'),
      cronable: boolean(name='Cronable'),
      execStatus: string(name='ExecStatus'),
      status: integer(name='Status'),
      allsparkId: string(name='AllsparkId'),
      agentPool: string(name='AgentPool'),
    }
  ](name='Scenes'),
}

async function listScenesWithOptions(request: ListScenesRequest, runtime: Util.RuntimeOptions): ListScenesResponse {
  Util.validateModel(request);
  return doRequest('ListScenes', 'HTTPS', 'POST', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', null, request, runtime);
}

async function listScenes(request: ListScenesRequest): ListScenesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listScenesWithOptions(request, runtime);
}

model DescribeSceneRequest = {
  sceneId: string(name='SceneId'),
}

model DescribeSceneResponse = {
  requestId: string(name='RequestId'),
  code: string(name='Code'),
  message: string(name='Message'),
  httpStatusCode: integer(name='HttpStatusCode'),
  success: boolean(name='Success'),
  scene: {
    id: string(name='Id'),
    name: string(name='Name'),
    type: string(name='Type'),
    variables: map[string]any(name='Variables'),
    headers: map[string]any(name='Headers'),
    creator: string(name='Creator'),
    modifier: string(name='Modifier'),
    createTime: long(name='CreateTime'),
    modifyTime: long(name='ModifyTime'),
    sla: string(name='Sla'),
    relations: [
      {
        id: long(name='Id'),
        name: string(name='Name'),
        disabled: boolean(name='Disabled'),
        headers: map[string]any(name='Headers'),
        nodes: [
          {
            nodeId: long(name='NodeId'),
            name: string(name='Name'),
            nodeType: string(name='NodeType'),
            config: string(name='Config'),
            params: string(name='Params'),
          }
        ](name='Nodes'),
        relationTestConfig: {
          beginStep: integer(name='BeginStep'),
          increment: integer(name='Increment'),
          endStep: integer(name='EndStep'),
        }(name='RelationTestConfig'),
      }
    ](name='Relations'),
    vips: [
      {
        domain: string(name='Domain'),
        enabled: boolean(name='Enabled'),
        ips: [ string ](name='Ips'),
      }
    ](name='Vips'),
    files: [
      {
        fileKey: string(name='FileKey'),
        fileName: string(name='FileName'),
        skipFirstLine: boolean(name='SkipFirstLine'),
        previewData: string(name='PreviewData'),
        remoteUrl: string(name='RemoteUrl'),
        ossUrl: string(name='OssUrl'),
        columns: string(name='Columns'),
        processedLineCount: long(name='ProcessedLineCount'),
        bizType: string(name='BizType'),
        exports: string(name='Exports'),
        createTime: long(name='CreateTime'),
        useOnce: boolean(name='UseOnce'),
        delimiter: string(name='Delimiter'),
        length: long(name='Length'),
        lineCount: long(name='LineCount'),
        exportedParams: [
          {
            name: string(name='Name'),
            column: string(name='Column'),
          }
        ](name='ExportedParams'),
      }
    ](name='Files'),
    status: {
      operations: map[string]any(name='Operations'),
      tips: string(name='Tips'),
      debugging: boolean(name='Debugging'),
      testing: boolean(name='Testing'),
      isCronable: boolean(name='IsCronable'),
      isReusable: boolean(name='IsReusable'),
      cronEditable: boolean(name='CronEditable'),
    }(name='Status'),
    testConfig: {
      mode: string(name='Mode'),
      maxDuration: integer(name='MaxDuration'),
      autoStep: boolean(name='AutoStep'),
      increment: integer(name='Increment'),
      keepTime: integer(name='KeepTime'),
      agentPool: string(name='AgentPool'),
      concurrencyLimit: string(name='ConcurrencyLimit'),
      customTraffic: boolean(name='CustomTraffic'),
      customConfig: string(name='CustomConfig'),
      intelligentTest: boolean(name='IntelligentTest'),
      agentCount: integer(name='AgentCount'),
      tpsLimit: integer(name='TpsLimit'),
      conditionSatisfiedExactly: string(name='ConditionSatisfiedExactly'),
      conditions: [
        {
          region: string(name='Region'),
          isp: string(name='Isp'),
          amount: integer(name='Amount'),
        }
      ](name='Conditions'),
      vpcConfig: {
        regionId: string(name='RegionId'),
        vSwitchId: string(name='VSwitchId'),
        securityGroupId: string(name='SecurityGroupId'),
        vpcId: string(name='VpcId'),
      }(name='VpcConfig'),
    }(name='TestConfig'),
  }(name='Scene'),
}

async function describeSceneWithOptions(request: DescribeSceneRequest, runtime: Util.RuntimeOptions): DescribeSceneResponse {
  Util.validateModel(request);
  return doRequest('DescribeScene', 'HTTPS', 'POST', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', null, request, runtime);
}

async function describeScene(request: DescribeSceneRequest): DescribeSceneResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSceneWithOptions(request, runtime);
}

model DescribeSceneRunningStatusRequest = {
  sceneId?: string(name='SceneId'),
}

model DescribeSceneRunningStatusResponse = {
  tips: string(name='Tips'),
  totalRequestCount: long(name='TotalRequestCount'),
  vum: long(name='Vum'),
  requestBps: string(name='RequestBps'),
  responseBps: string(name='ResponseBps'),
  failedRequestCount: long(name='FailedRequestCount'),
  failedBusinessCount: long(name='FailedBusinessCount'),
  concurrency: integer(name='Concurrency'),
  concurrencyLimit: integer(name='ConcurrencyLimit'),
  tps: integer(name='Tps'),
  tpsLimit: integer(name='TpsLimit'),
  aliveAgents: integer(name='AliveAgents'),
  totalAgents: integer(name='TotalAgents'),
  seg90Rt: long(name='Seg90Rt'),
  averageRt: long(name='AverageRt'),
  reportId: string(name='ReportId'),
  beginTime: long(name='BeginTime'),
  currentTime: long(name='CurrentTime'),
  code: string(name='Code'),
  message: string(name='Message'),
  httpStatusCode: integer(name='HttpStatusCode'),
  success: boolean(name='Success'),
  useCustomPool: boolean(name='UseCustomPool'),
  requestId: string(name='RequestId'),
  status: integer(name='Status'),
  hasReport: boolean(name='HasReport'),
  hasError: boolean(name='HasError'),
  agentLocation: string(name='AgentLocation'),
  chainMonitorDataList: [
    {
      chainId: long(name='ChainId'),
      timePoint: long(name='TimePoint'),
      configQps: integer(name='ConfigQps'),
      realQps: float(name='RealQps'),
      concurrency: float(name='Concurrency'),
      qps2XX: float(name='Qps2XX'),
      failedQps: float(name='FailedQps'),
      averageRt: integer(name='AverageRt'),
      maxRt: integer(name='MaxRt'),
      minRt: integer(name='MinRt'),
      count2XX: long(name='Count2XX'),
      failedCount: long(name='FailedCount'),
      queueSize: integer(name='QueueSize'),
      queueCapacity: integer(name='QueueCapacity'),
      qpsSummary: [
        {
          statusCode: integer(name='StatusCode'),
          qps: float(name='Qps'),
          totalCount: integer(name='TotalCount'),
        }
      ](name='QpsSummary'),
      checkPointResult: {
        succeedBusinessCount: long(name='SucceedBusinessCount'),
        failedBusinessCount: long(name='FailedBusinessCount'),
        succeedBusinessQps: float(name='SucceedBusinessQps'),
        failedBusinessQps: float(name='FailedBusinessQps'),
      }(name='CheckPointResult'),
    }
  ](name='ChainMonitorDataList'),
}

async function describeSceneRunningStatusWithOptions(request: DescribeSceneRunningStatusRequest, runtime: Util.RuntimeOptions): DescribeSceneRunningStatusResponse {
  Util.validateModel(request);
  return doRequest('DescribeSceneRunningStatus', 'HTTPS', 'POST', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', null, request, runtime);
}

async function describeSceneRunningStatus(request: DescribeSceneRunningStatusRequest): DescribeSceneRunningStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSceneRunningStatusWithOptions(request, runtime);
}

model AdjustSceneSpeedRequest = {
  sceneId: string(name='SceneId'),
  speedData: string(name='SpeedData'),
  content?: string(name='Content'),
}

model AdjustSceneSpeedResponse = {
  message: string(name='Message'),
  code: string(name='Code'),
  success: boolean(name='Success'),
  requestId: string(name='RequestId'),
  httpStatusCode: integer(name='HttpStatusCode'),
}

async function adjustSceneSpeedWithOptions(request: AdjustSceneSpeedRequest, runtime: Util.RuntimeOptions): AdjustSceneSpeedResponse {
  Util.validateModel(request);
  return doRequest('AdjustSceneSpeed', 'HTTPS', 'POST', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', null, request, runtime);
}

async function adjustSceneSpeed(request: AdjustSceneSpeedRequest): AdjustSceneSpeedResponse {
  var runtime = new Util.RuntimeOptions{};
  return adjustSceneSpeedWithOptions(request, runtime);
}

model AdjustRelationSpeedRequest = {
  sceneId?: string(name='SceneId'),
  speed?: integer(name='Speed'),
  relationIndex?: integer(name='RelationIndex'),
}

model AdjustRelationSpeedResponse = {
  message: string(name='Message'),
  code: string(name='Code'),
  success: boolean(name='Success'),
  requestId: string(name='RequestId'),
  httpStatusCode: integer(name='HttpStatusCode'),
}

async function adjustRelationSpeedWithOptions(request: AdjustRelationSpeedRequest, runtime: Util.RuntimeOptions): AdjustRelationSpeedResponse {
  Util.validateModel(request);
  return doRequest('AdjustRelationSpeed', 'HTTPS', 'POST', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', null, request, runtime);
}

async function adjustRelationSpeed(request: AdjustRelationSpeedRequest): AdjustRelationSpeedResponse {
  var runtime = new Util.RuntimeOptions{};
  return adjustRelationSpeedWithOptions(request, runtime);
}

model DescribeSamplingLogRequest = {
  reportId: string(name='ReportId'),
  chainId?: long(name='ChainId'),
  pageNumber: integer(name='PageNumber'),
  pageSize: integer(name='PageSize'),
  errorCode?: string(name='ErrorCode'),
  httpResponseStatus?: string(name='HttpResponseStatus'),
  rtRange?: string(name='RtRange'),
}

model DescribeSamplingLogResponse = {
  message: string(name='Message'),
  httpStatusCode: integer(name='HttpStatusCode'),
  success: boolean(name='Success'),
  code: string(name='Code'),
  requestId: string(name='RequestId'),
  pageNumber: integer(name='PageNumber'),
  pageSize: integer(name='PageSize'),
  totalCount: long(name='TotalCount'),
  samplingLogs: [
    {
      chainId: string(name='ChainId'),
      timestamp: string(name='Timestamp'),
      httpRequestMethod: string(name='HttpRequestMethod'),
      httpRequestBody: string(name='HttpRequestBody'),
      httpRequestHeaders: string(name='HttpRequestHeaders'),
      httpRequestUrl: string(name='HttpRequestUrl'),
      httpStartTime: string(name='HttpStartTime'),
      httpResponseBody: string(name='HttpResponseBody'),
      httpResponseFailMsg: string(name='HttpResponseFailMsg'),
      httpResponseHeaders: string(name='HttpResponseHeaders'),
      importContent: string(name='ImportContent'),
      exportConfig: string(name='ExportConfig'),
      exportContent: string(name='ExportContent'),
      checkResult: string(name='CheckResult'),
      httpTiming: string(name='HttpTiming'),
      rt: string(name='Rt'),
      httpResponseStatus: string(name='HttpResponseStatus'),
      transId: string(name='TransId'),
      groupTag: string(name='GroupTag'),
    }
  ](name='SamplingLogs'),
}

async function describeSamplingLogWithOptions(request: DescribeSamplingLogRequest, runtime: Util.RuntimeOptions): DescribeSamplingLogResponse {
  Util.validateModel(request);
  return doRequest('DescribeSamplingLog', 'HTTPS', 'POST', '2019-08-10', 'AK,APP,PrivateKey,BearerToken', null, request, runtime);
}

async function describeSamplingLog(request: DescribeSamplingLogRequest): DescribeSamplingLogResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeSamplingLogWithOptions(request, runtime);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }

  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}
